<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>计算一直角三角形的斜边长度</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.hexdec.html">hexdec</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.is-finite.html">is_finite</a></div>
 <div class="up"><a href="ref.math.html">Math 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="function.hypot" class="refentry">
   <div class="refnamediv">
    <h1 class="refname">hypot</h1>
    <p class="verinfo">(PHP 4 &gt;= 4.1.0, PHP 5)</p><p class="refpurpose"><span class="refname">hypot</span> &mdash; <span class="dc-title">
     计算一直角三角形的斜边长度
    </span></p>

   </div>
 <div class="refsect1 description" id="refsect1-function.hypot-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">float</span> <span class="methodname"><strong>hypot</strong></span>
    ( <span class="methodparam"><span class="type">float</span> <code class="parameter">$x</code></span>
   , <span class="methodparam"><span class="type">float</span> <code class="parameter">$y</code></span>
   )</div>

    <p class="para rdfs-comment">
     <span class="function"><strong>hypot()</strong></span> 函数将会跟据直角三角形的两直解边长度
     <em><code class="parameter">x</code></em> 和 <em><code class="parameter">y</code></em> 计算其斜边的长度。或者是从标点
     (<em><code class="parameter">x</code></em>, <em><code class="parameter">y</code></em>) 到原点的距离。该函数的算法等同于
   <em>sqrt(x*x + y*y)</em>。
    </p>
   </div>

   <div class="refsect1 parameters" id="refsect1-function.hypot-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    
     <dt>
<em><code class="parameter">x</code></em></dt>

     <dd>

      <p class="para">
       第一条边的长度
      </p>
     </dd>

    
    
     <dt>
<em><code class="parameter">y</code></em></dt>

     <dd>

      <p class="para">
       第二条边的长度
      </p>
     </dd>

    
   </dl>

  </p>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-function.hypot-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   计算斜边的长度
  </p>
 </div>

  </div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.hexdec.html">hexdec</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.is-finite.html">is_finite</a></div>
 <div class="up"><a href="ref.math.html">Math 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
